/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.soc.cs5226.gui.entities.util;

import java.text.SimpleDateFormat;

/**
 *
 * @author Huimin
 */
public abstract class Constants {
    public static final String JAVADB = "java:comp/env/jdbc/perfdb";
    public static final String REPORT_PATH = "D:/HuiminProjects/DBMonitoringDashboard/trunk/DBMonitoringDashboard/reportsTemplates/";
    public static final String OUTPUTREPORT_PATH = "D:/HuiminProjects/DBMonitoringDashboard/trunk/DashBoardReports/";
    public static final String SHAREDPOOL = "sharedpool";
    public static final String BUFFERCACHE = "buffercache";
    public static final String REDOLOGBUFFER = "redologbuffer";
    public static final String SORTMEMORY = "sortmemory";
    public static final String ROLLBACKSEGMENT = "rollbacksegment";
    public static final String SHAREDPOOLINIT = "shared_pool_size";
    public static final String BUFFERCACHEBUFFERINIT = "db_block_buffers";
    public static final String BUFFERCACHESIZEINIT = "db_block_size";
    public static final String REDOLOGBUFFERINIT = "log_buffer";
    public static final String SORTMEMORYINIT = "sort_area_size";
    public static final String ROLLBACKSEGMENTINIT = "rollback_segments";
    
    public static final SimpleDateFormat DATEFORMAT = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
    
    public static String convertStatus(String oldStatus)
    {
        String newStatus = oldStatus;
        if (oldStatus.equalsIgnoreCase("G"))
            newStatus = "Green";
        else if (oldStatus.equalsIgnoreCase("Y"))
            newStatus = "Yellow";
        else if (oldStatus.equalsIgnoreCase("R"))
            newStatus = "Red";
        
        return newStatus;
    }
}
